﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Numerics;

namespace ArgusLib.Fractals.OrbitFractals
{
	public class MultibrotSet : MandelbrotSetBase, IFractal
	{
		private ParameterMultibrotSet parameter;
		public ParameterMultibrotSet Parameter
		{
			get { return this.parameter; }
			set
			{
				if (value == null)
					throw new ArgumentNullException();
				this.parameter = value;
				base.Parameter = value;
			}
		}
		ArgusLib.Fractals.IParameter IFractal.Parameter { get { return this.Parameter; } set { this.Parameter = (ParameterMultibrotSet)value; } }

		public MultibrotSet(ParameterMultibrotSet parameter)
			: base(parameter)
		{
			this.Parameter = parameter;
		}

		protected override Complex IterationFormula(Complex z, Complex c)
		{
			return Complex.Pow(z, this.Parameter.Power) + c;
		}
	}
}
